<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Driver installation | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'sql-odbc-installation.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/sql-odbc-installation.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/sql-odbc-installation.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/sql-odbc-installation.html" rel="nofollow" target="_blank">../en/sql-odbc-installation.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="xpack-sql.html">SQL access</a></span>
»
<span class="breadcrumb-link"><a href="sql-odbc.html">SQL ODBC</a></span>
»
<span class="breadcrumb-node">Driver installation</span>
</div>
<div class="navheader">
<span class="prev">
<a href="sql-odbc.html">« SQL ODBC</a>
</span>
<span class="next">
<a href="sql-odbc-setup.html">Configuration »</a>
</span>
</div>
<div class="section xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="sql-odbc-installation"></a>Driver installation<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>The Elasticsearch SQL ODBC Driver can be installed on Microsoft Windows using an MSI package. The installation process is simple and is composed of standard MSI wizard steps.</p>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="prerequisites"></a>Installation Prerequisites<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The recommended installation platform is Windows 10 64 bit <em>or</em> Windows Server 2016 64 bit.</p>
<p>Before you install the Elasticsearch SQL ODBC Driver you need to meet the following prerequisites;</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
.NET Framework 4.0 full - <a href="https://www.microsoft.com/en-au/download/details.aspx?id=17718" class="ulink" target="_top">https://www.microsoft.com/en-au/download/details.aspx?id=17718</a>
</li>
<li class="listitem">
<p>Microsoft Visual C++ Redistributable for Visual Studio 2017 - <a href="https://support.microsoft.com/en-au/help/2977003/the-latest-supported-visual-c-downloads" class="ulink" target="_top">https://support.microsoft.com/en-au/help/2977003/the-latest-supported-visual-c-downloads</a></p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
The 64 bit driver requires the x64 redistributable
</li>
<li class="listitem">
The 32 bit driver requires the x86 or the x64 redistributable (the latter also installs the components needed for the 32 bit driver)
</li>
</ul>
</div>
</li>
<li class="listitem">
Elevated privileges (administrator) for the User performing the installation.
</li>
</ul>
</div>
<p>If you fail to meet any of the prerequisites the installer will show an error message and abort the installation.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>It is not possible to inline upgrade using the MSI. In order to upgrade, you will first have to uninstall the old driver and then install the new driver.</p>
</div>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>When installing the MSI, the Windows Defender SmartScreen might warn
about running an unrecognized app. If the MSI has been downloaded from
Elastic’s web site, it is safe to acknowledge the message by allowing the
installation to continue (<code class="literal">Run anyway</code>).</p>
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="download"></a>Download the <code class="literal">.msi</code> package(s)<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Download the <code class="literal">.msi</code> package for Elasticsearch SQL ODBC Driver 7.7.1 from:
<a href="https://www.elastic.co/downloads/odbc-client" class="ulink" target="_top">https://www.elastic.co/downloads/odbc-client</a></p>
<p>There are two versions of the installer available:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<span class="strong strong"><strong>32 bit driver (x86)</strong></span> for use with the Microsoft Office 2016 suite of applications; notably Microsoft Excel and Microsoft Access and other 32 bit based programs.
</li>
<li class="listitem">
<span class="strong strong"><strong>64 bit driver (x64)</strong></span> recommended for use with all other applications.
</li>
</ul>
</div>
<p>Users should consider downloading and installing both the 32 and 64 bit drivers for maximum compatibility across applications installed on their system.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="installation-gui"></a>Installation using the graphical user interface (GUI)<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Double-click the downloaded <code class="literal">.msi</code> package to launch a GUI wizard that will guide you through the installation process.</p>
<p>You will first be presented with a welcome screen:</p>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_started.png" alt="Installer Welcome Screen">
</div>
</div>
<p>Clicking <span class="strong strong"><strong>Next</strong></span> will present the End User License Agreement. You will need to accept the license agreement in order to continue the installation.</p>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_accept_license.png" alt="Installer EULA Screen">
</div>
</div>
<p>The following screen allows you to customise the installation path for the Elasticsearch ODBC driver files.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>The default installation path is of the format: <span class="strong strong"><strong>%ProgramFiles%\Elastic\ODBCDriver\7.7.1</strong></span></p>
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_choose_destination.png" alt="Installer Driver Path">
</div>
</div>
<p>You are now ready to install the driver.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>You will require elevated privileges (administrator) for installation.</p>
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_ready_install.png" alt="Installer Begin">
</div>
</div>
<p>Assuming the installation takes place without error you should see progress screen, followed by the finish screen:</p>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_installing.png" alt="Installer Installing">
</div>
</div>
<p>On the finish screen you can launch the ODBC Data Source Administration screen by checking the dialog checkbox. This will automatically launch the configuration screen on close (either 32 bit or 64 bit) where you can configure a DSN.</p>
<div class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/installer_finish.png" alt="Installer Complete">
</div>
</div>
<p>As with any MSI installation package, a log file for the installation process can be found within the <code class="literal">%TEMP%</code> directory, with a randomly generated name adhering to the format <code class="literal">MSI&lt;random&gt;.LOG</code>.</p>
<p>If you encounter an error during installation we would encourage you to open an issue <a href="https://github.com/elastic/elasticsearch-sql-odbc/issues" class="ulink" target="_top">https://github.com/elastic/elasticsearch-sql-odbc/issues</a>, attach your installation log file and provide additional details so we can investigate.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="installation-cmd"></a>Installation using the command line<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>The examples given below apply to installation of the 64 bit MSI package. To achieve the same result with the 32 bit MSI package you would instead use the filename suffix <code class="literal">windows-x86.msi</code></p>
</div>
</div>
<p>The <code class="literal">.msi</code> can also be installed via the command line. The simplest installation using the same defaults as the GUI is achieved by first navigating to the download directory, then running:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">msiexec.exe /i esodbc-7.7.1-windows-x86_64.msi /qn</pre>
</div>
<p>By default, <code class="literal">msiexec.exe</code> does not wait for the installation process to complete, since it runs in the Windows subsystem. To wait on the process to finish and ensure that <code class="literal">%ERRORLEVEL%</code> is set accordingly, it is recommended to use <code class="literal">start /wait</code> to create a process and wait for it to exit:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">start /wait msiexec.exe /i esodbc-7.7.1-windows-x86_64.msi /qn</pre>
</div>
<p>As with any MSI installation package, a log file for the installation process can be found within the <code class="literal">%TEMP%</code> directory, with a randomly generated name adhering to the format <code class="literal">MSI&lt;random&gt;.LOG</code>. The path to a log file can be supplied using the <code class="literal">/l</code> command line argument</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">start /wait msiexec.exe /i esodbc-7.7.1-windows-x86_64.msi /qn /l install.log</pre>
</div>
<p>Supported Windows Installer command line arguments can be viewed using:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">msiexec.exe /help</pre>
</div>
<p>…​or by consulting the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa367988(v=vs.85).aspx" class="ulink" target="_top">Windows Installer SDK Command-Line Options</a>.</p>
<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="odbc-msi-command-line-options"></a>Command line options<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h4>
</div></div></div>
<p>All settings exposed within the GUI are also available as command line arguments (referred to as <em>properties</em> within Windows Installer documentation) that can be passed to <code class="literal">msiexec.exe</code>:</p>
<div class="informaltable">
<table border="0" cellpadding="4px">
<colgroup>
<col>
<col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="top">
<p>
<code class="literal">INSTALLDIR</code>
</p>
</td>
<td valign="top">
<p>
The installation directory.
Defaults to <code class="literal">%ProgramFiles%\Elastic\ODBCDriver\7.7.1</code>.
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>To pass a value, simply append the property name and value using the format <code class="literal">&lt;PROPERTYNAME&gt;="&lt;VALUE&gt;"</code> to
the installation command. For example, to use a different installation directory to the default one:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">start /wait msiexec.exe /i esodbc-7.7.1-windows-x86_64.msi /qn INSTALLDIR="c:\CustomDirectory"</pre>
</div>
<p>Consult the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa367988(v=vs.85).aspx" class="ulink" target="_top">Windows Installer SDK Command-Line Options</a>
for additional rules related to values containing quotation marks.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="odbc-uninstall-msi-gui"></a>Uninstall using Add/Remove Programs<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h4>
</div></div></div>
<p>The <code class="literal">.msi</code> package handles uninstallation of all directories and files added as part of installation.</p>
<div class="warning admon">
<div class="icon"></div>
<div class="admon_content">
<p>Uninstallation will remove <span class="strong strong"><strong>all</strong></span> contents created as part of installation.</p>
</div>
</div>
<p>An installed program can be uninstalled by pressing the Windows key and typing <code class="literal">add or remove programs</code> to open the system settings.</p>
<p>Once opened, find the Elasticsearch ODBC Driver installation within the list of installed applications, click and choose <code class="literal">Uninstall</code>:</p>
<div id="odbc-msi-installer-uninstall" class="imageblock">
<div class="content">
<img src="../static/images/sql/odbc/uninstall.png" alt="uninstall">
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="odbc-uninstall-msi-command-line"></a>Uninstall using the command line<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/odbc/installation.asciidoc">edit</a>
</h4>
</div></div></div>
<p>Uninstallation can also be performed from the command line by navigating to the directory
containing the <code class="literal">.msi</code> package and running:</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">start /wait msiexec.exe /x esodbc-7.7.1-windows-x86_64.msi /qn</pre>
</div>
<p>Similar to the install process, a path for a log file for the uninstallation process can be passed using the <code class="literal">/l</code> command line argument</p>
<div class="pre_wrapper lang-sh">
<pre class="programlisting prettyprint lang-sh">start /wait msiexec.exe /x esodbc-7.7.1-windows-x86_64.msi /qn /l uninstall.log</pre>
</div>
</div>

</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="sql-odbc.html">« SQL ODBC</a>
</span>
<span class="next">
<a href="sql-odbc-setup.html">Configuration »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>